import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  { path: '/', redirect: { name: 'Home' } },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home-page/index.vue'),
    meta: { keepAlive: true } 
  },
  {
    path: '/message',
    name: 'message',
    component: () => import('@/views/message-page/index.vue'),
    meta: { keepAlive: true } 
  },
  {
    path: '/store',
    name: 'store',
    component: () => import('@/views/store-page/index.vue'),
    meta: { keepAlive: true } 
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
